<div class="Recommend_boxer borderbox" id="RecommendProp">



	<h3><a href="ershoufang.php" class="more">更多二手房&nbsp;»</a>您可能感兴趣的房子</h3>
	<ul class="list">
<?php

	//if(isset($_COOKIE['interest']))
	if(true)
	{
		$interest = $_COOKIE['interest'];
		$interest = explode('-',$interest);
		$quyu = $interest[0];
		$huxing_shi = $interest[1];
		$zhuangxiu = $interest[2];
		$jiage = $interest[3];


			require_once ("./includes/configure.php");
			require_once ("./includes/database.php");
			$db = Database :: Connect();
			if($quyu){
				$sql_var = "quyu = $quyu or ";
			}
			if(isset($_COOKIE['interest'])){
				$sql = "select * from zufang where type=1 and ($sql_var huxing like '%$huxing_shi%' or zhuangxiu like '%$zhuangxiu%' or jiage <=$jiage)";
			}else{
				$sql = "select * from zufang where type=1 order by `time` desc";
			}

			$sql .= " limit 0,4";
			$rows = $db->GetResultSet($sql)  or die ("出错啦!");


			$num = mysql_num_rows($rows);
            if($num > 0){
			while ($row = mysql_fetch_array($rows)) {
				$id = $row['id'];
				$biaoti = $row['biaoti'];
				$xiaoquid = $row['xiaoqu'];
				$dizhi = $row['dizhi'];
				$jiage = $row['jiage'];
				$huxing = $row['huxing'];
				$huxing = explode('|', $huxing);
				$huxing_shi = $huxing[0] . '室';
				$huxing_ting = $huxing[1] . '厅';
				$huxing_wei = $huxing[2] . '卫';
				$huxing = $huxing_shi . $huxing_ting . $huxing_wei;
				$zhuangxiu = $row['zhuangxiu'];
				$louceng = $row['louceng'];
				$chuzufangshi = $row['zulin'];
				$jitui = $row['jitui'];
				$xintui = $row['xintui'];
				$duotu = $row['duotu'];
				$lianxiren = $row['lianxiren'];
				$fangling = $row['fangling'];
				$time = $row['time'];
				$tupian = $row['tupian'];
	            $tupian = explode(";",$tupian);


?>

		<li><a href="fangwu.php?id=<?php echo $id?>" class="image"><img src="<?php echo './'.$tupian[0] ?>"
			width="100" height="75" onerror="this.src='./images/avatar.gif'"></a> <span class="sale_tag"></span>
		<p class="propinfo"><a
			href="fangwu.php?id=<?php echo $id?>"><?php echo $biaoti.'  -  '.$xiaoquming?><br>
		<?php echo $huxing.' , '.$mianji.'平米'?></a></p>
		<p class="price"><?php echo $jiage?>万元</p>
		</li>
		<?php }

            }else{
            echo "快去看你感兴趣的房子吧 !";
            }
	}else{
            	echo "快去看你感兴趣的房子吧 ！";
            }


			$db->Close();
		?>

	</ul>
	<div class="bottom_links"><a
		href="http://my.fangkewang.com/prop/collection?show=best" class="more">更多为我推荐的房子&nbsp;»</a> <a
		href="http://my.fangkewang.com/marked/0" class="probill">我的选房单&nbsp;»</a>
	<a href="http://my.fangkewang.com/member/manpropcond/" class="profactor">我的找房条件&nbsp;»</a></div>
</div>